package section_05;

import java.util.Scanner;

public class chapter_10 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("first:");
        int a = scanner.nextInt();

        System.out.println("second:");
        int b = scanner.nextInt();

        draw(a, b);
    }

    public static void draw(int m, int n) {
        if (m <= 0 || n <= 0) {
            throw new IllegalArgumentException();
        }
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < n; j++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
}
